Skip to content

Style method entries as signature cards in aliki theme#1669

Open
st0012 wants to merge 1 commit intomasterfrom
signature-card-design
Open

Style method entries as signature cards in aliki theme#1669
st0012 wants to merge 1 commit intomasterfrom
signature-card-design

Conversation

@st0012
Copy link
Copy Markdown
Member

@st0012 st0012 commented Apr 2, 2026

Summary

  • Add subtle background card with left accent border to method headers, visually separating the API signature zone from documentation prose
  • New --color-sig-bg design token (lighter than --color-code-bg) for both light and dark themes
  • Source button repositioned with absolute positioning (was float-based)
  • Method heading links no longer inherit global underline styles
  • Description body gets slight left padding to align with the accent border

CSS-only change — no template modifications.

Before / After

Before After
sig-card-before Screenshot 2026-04-02 at 15 25 10

@matzbot
Copy link
Copy Markdown
Collaborator

matzbot commented Apr 2, 2026

🚀 Preview deployment available at: https://42beeecc.rdoc-6cd.pages.dev (commit: be86678)

@st0012 st0012 marked this pull request as ready for review April 2, 2026 14:39
@st0012 st0012 force-pushed the signature-card-design branch 2 times, most recently from 7235073 to 251f5db Compare April 2, 2026 16:23
Add a subtle background card to method headers to visually
separate the API signature zone from the documentation prose.

- New `--color-sig-bg` token (lighter than `--color-code-bg`)
- `.method-header` gets background, hairline border, padding
- `.method-controls` absolutely positioned on `.method-detail`
- `.method-heading a` removes inherited underline
- `.method-description pre` uses left accent border (no outline)
- `.method-description` gets `line-height: 1.7` for readability
@st0012 st0012 force-pushed the signature-card-design branch from 251f5db to be86678 Compare April 2, 2026 18:05
@kou kou requested a review from Copilot April 8, 2026 14:39
Copy link
Copy Markdown
Member

@kou kou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Aliki RDoc theme CSS to visually present method signature blocks as “cards,” improving separation between API signatures and documentation text while keeping templates unchanged.

Changes:

  • Introduces new signature-specific design tokens (--color-sig-bg, --color-sig-border) for light/dark themes.
  • Styles method headers with a background “card” and accent border; removes underline styling from method heading links.
  • Repositions the “Source” toggle button using absolute positioning and adjusts spacing in method descriptions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 1337 to 1341
main .method-controls {
float: right;
position: absolute;
top: var(--space-3);
right: var(--space-3);
}
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

main .method-controls is now absolutely positioned, but .method-header/.method-heading no longer reserves horizontal space for it (the previous max-width: calc(100% - 6em) was removed). With long call sequences or method names, the signature text can render underneath the “Source” control.

Consider reserving space via padding-right on .method-header/.method-heading (or a grid/flex layout that allocates a dedicated column for .method-controls) so the signature and control cannot overlap.

Copilot uses AI. Check for mistakes.
Comment on lines +1384 to 1389
margin-top: var(--space-5);
padding-left: var(--space-2);
color: var(--color-text-primary);
line-height: var(--line-height-relaxed);
}

Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The selector main .method-description applies to both method docs and attribute docs (attributes also render a .method-description block, but don’t have the new .method-header “signature card”). The new margin-top/padding-left intended to align with the signature card will therefore also shift attribute descriptions.

If the intent is to only style method descriptions, consider scoping the rule to method entries (e.g., target .method-description that follows a .method-header within the same .method-detail) so attribute descriptions keep their previous alignment.

Suggested change
margin-top: var(--space-5);
padding-left: var(--space-2);
color: var(--color-text-primary);
line-height: var(--line-height-relaxed);
}
color: var(--color-text-primary);
line-height: var(--line-height-relaxed);
}
main .method-detail .method-header + .method-description {
margin-top: var(--space-5);
padding-left: var(--space-2);
}

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants